#ifndef SECTIONVIEWTABWIDGET_H
#define SECTIONVIEWTABWIDGET_H

#include <QTabWidget>

class NameTabDialog;
class TabBar;
class TabCloseButton;

class SectionViewTabWidget : public QTabWidget
{
    Q_OBJECT
public:
    explicit SectionViewTabWidget (QWidget *parent = 0);
    ~SectionViewTabWidget();

    QList<QString> tabNames() const;

public slots:
    void showContextMenu (const QPoint &point);
    void createTab();
    void renameTab();
    void closeTab();

signals:
    void notifyHint (QString title, QString message);
    void notifyInformation (QString title, QString message);
    void notifyWarning (QString title, QString message);

protected:
    virtual void tabInserted (int index);
    virtual void tabRemoved (int index);

private slots:
    void finishRenameTab();

private:
    TabBar* m_tabBar;
    TabCloseButton* m_closeButton;
    NameTabDialog* m_nameTabDialog;
};

#endif // SECTIONVIEWTABWIDGET_H
